package org.duang.kit;

import java.util.ArrayList;
import java.util.List;

import org.apache.poi.ss.formula.functions.T;

public class DuangList {

	private static List<T> _duangList = null;
	private static DuangList duangList = null;

	public static DuangList duang(T t) {
		return init(0);
	}
	public static DuangList duang(int size) {
		return init(size);
	}
	
	private static DuangList init(int size) {
		duangList = new DuangList();
		_duangList = (size == 0) ? new ArrayList<T>() : new ArrayList<T>(size);
		return duangList;
	}

	public DuangList add(T value) {
		_duangList.add(value);
		return this;
	}

	public List<T> getList() {
		return _duangList;
	}
}
